﻿using System.IO;

namespace Com.VikingErik.Mvc.ResumingDownloads
{
    public class ResumableFileStreamResult : ResumableDownloadResult
    {
        private Stream ContentStream { get; set; }

        public ResumableFileStreamResult(ResumableDownloadRequest resumableDownloadRequest, Stream content)
            : base(resumableDownloadRequest)
        {
            ContentStream = content;
        }

        public ResumableFileStreamResult(ResumableDownloadRequest resumableDownloadRequest, Stream content, string contentType)
            : base(resumableDownloadRequest, contentType)
        {
            ContentStream = content;
        }

        protected override Stream FileContent
        {
            get
            {
                return ContentStream;
            }
        }
    }
}
